#pragma once

class CFilterEdit : public CWindowImpl<CFilterEdit,CEdit>
{
public:
	BEGIN_MSG_MAP(CFilterEdit)
		MESSAGE_HANDLER(WM_CHAR, OnChar)
	END_MSG_MAP()

	LRESULT OnChar(UINT nMsgType,WPARAM wParam,LPARAM lParam,BOOL& bHandled)
	{
		if(wParam == '\\' || wParam == ':' || wParam == '>' ||
		   wParam == '<'  || wParam == '|' || wParam == '"' ||
		   wParam == '*'  || wParam == '?' || wParam == '/' ||
		   wParam == '&'  || wParam == '^' || wParam == '%')
		{ 
			bHandled=TRUE;
		}
		else
		{
			bHandled=FALSE;
		}
		return S_OK;
	}
};